﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GmFamilyUtils.h"
#include <map>

namespace gfam
{
    /// \brief 用户行为跟踪类
    ///
    /// 用于向埋点服务器发送用户行为信息
    class GM_FAMILY_UTILS_EXPORT IUserBehaviorTrack final
    {
    public:
        /// \brief 向埋点服务器发送用户行为信息
        /// \param module 所属模块
        /// \param eventName 事件名称
        /// \param attributes 属性信息集合，默认为空
        /// \param timeStamp 时间戳，默认为空。为空时，会自动添加调用时的时间戳
        /// \return 无
        static void Track(
            const std::wstring& module,
            const std::wstring& eventName,
            const std::map<std::wstring, std::wstring>& attributes = {},
            const std::wstring& timeStamp = L"");

    public:
        virtual ~IUserBehaviorTrack();
    };
}
